/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package mesaAyuda;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Lore
 */
@Entity
@Table(name = "CATTOPICOSAYUDA")
@NamedQueries({
    @NamedQuery(name = "TopicoAyuda.findAll", query = "SELECT t FROM TopicoAyuda t")})
public class TopicoAyuda implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "IDTOPICO")
    private Integer idtopico;
    @Basic(optional = false)
    @Column(name = "IDAREA")
    private int idarea;
    @Column(name = "DESCRIPCION")
    private String descripcion;

    public TopicoAyuda() {
    }

    public TopicoAyuda(Integer idtopico) {
        this.idtopico = idtopico;
    }

    public TopicoAyuda(Integer idtopico, int idarea) {
        this.idtopico = idtopico;
        this.idarea = idarea;
    }

    public Integer getIdtopico() {
        return idtopico;
    }

    public void setIdtopico(Integer idtopico) {
        this.idtopico = idtopico;
    }

    public int getIdarea() {
        return idarea;
    }

    public void setIdarea(int idarea) {
        this.idarea = idarea;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idtopico != null ? idtopico.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TopicoAyuda)) {
            return false;
        }
        TopicoAyuda other = (TopicoAyuda) object;
        if ((this.idtopico == null && other.idtopico != null) || (this.idtopico != null && !this.idtopico.equals(other.idtopico))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mesaAyuda.TopicoAyuda[ idtopico=" + idtopico + " ]";
    }
    
}
